<template>
	<!--
	    author: 李文昊
	    conPropertyList-container:总包裹
		conPropertyList-content:最近点击的项包裹
		jump:跳转方法
		title:大楼名称
		p:大楼地址
		conPropertyList-content maBottom:循环总的项
		v-if:如果标题不为空或者""才显示
	-->
	<view class="conPropertyList-container">
		<view class="conPropertyList-content" @click="jump(recentSelection.title)"
			v-if="recentSelection.title!=null&&recentSelection.title!=''">
			<view class="content-c1">
				<view class="propertyTitle conPropertyList-title">
					<text>{{recentSelection.title}}</text>
				</view>
				<view class="propertyTitle conPropertyList-p">
					<text>{{recentSelection.p}}</text>
				</view>
			</view>
			<view class="content-c2">
				<text class="propertyTitle conPropertyList-bq">最近</text>
			</view>
		</view>
		<view class="maTop" v-if="recentSelection.title!=null&&recentSelection.title!=''">
		</view>
		<view class="conPropertyList-content maBottom" v-for="(item,index) in propertyList" :key="index"
			@click="jump(item.title)">
			<view class="content-c1">
				<view class="propertyTitle conPropertyList-title">
					<text>{{item.title}}</text>
				</view>
				<view class="propertyTitle conPropertyList-p">
					<text>{{item.p}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	/**
	 * author: 李文昊
	 * propertyList: 从父组件接收的总大楼数组
	 * recentSelection:从父组件接收的最近对象
	 */
	export default {
		props: {
			propertyList: Array,
			recentSelection: Object
		},
		methods: {
			jump(value) {
				uni.navigateTo({
					url: '/pages/conferenceRoom/list/list?property=' + value
				});
			}
		}
	}
</script>

<style>
	.conPropertyList-container {
		background-color: #ececec;
		overflow: hidden;
	}

	.propertyTitle {
		font-size: 28rpx;
	}

	.conPropertyList-content {
		display: flex;
		flex-flow: row;
		padding: 20rpx 60rpx;
		background-color: #FFFFFF;
	}

	.maTop {
		margin-top: 10rpx;
	}

	.maBottom {
		border-bottom: solid 1rpx #ececec;
		
	}

	.content-c2 {
		flex-grow: 1;
		display: flex;
		flex-flow: row-reverse;
		align-items: center;
	}

	.content-c1 {
		line-height: 1.5;
	}

	.conPropertyList-title {
		font-weight: 800;
		font-size: 32rpx;
	}

	.conPropertyList-p {
		color: #666666;
	}

	.conPropertyList-bq {
		background-color: #ff6970;
		border-radius: 8rpx;
		color: #FFFFFF;
		min-width: 80rpx;
		line-height: 2;
		font-size: 26rpx;
		text-align: center;
	}
</style>
